<%--
    Document   : GioHang
    Created on : Apr 26, 2011, 3:19:40 PM
    Author     : MongKieu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<div style="padding-top:10px; padding-left:10px; clear:both; height:500px">
    <div style="cursor:pointer;width:auto;border-bottom:#d6d6d6 1px dotted;" >
        <h3>GIỎ HÀNG CỦA BẠN</h3>
    </div>

    <div style="padding-top:2px">
        <br/>
        <c:if test="${!empty(listSanPham)}">
            <c:forEach var="sanPham" items="${listSanPham}" varStatus="STT">
                <table style="padding-top:1px; ">
                    <tr><td valign="top" width="50px" height="60px"><img src="${sanPham.hinhAnhMinhHoa}" class="frameSmall"/></td>
                        <td valign="top"><span style="color:black"><B>${sanPham.tenSanPham}</B> (${sanPham.nhaXuatBan.tenNhaSanXuat})</span><br /><br />
                            <b>Giá: <span style="color:#8a3c3d">${sanPham.giaBanHienTai} đ</span></b> x <input type="text"
                                                                                                               style="width:25px" value="${sanPham.soLuongDangCo}" id="soLuong${sanPham.ISBN}" maxlength="3"/>  &nbsp; <span class="linkitem"><a onclick="location.href='GioHang.htm?action=CapNhat&amp;SoLuong='+document.getElementById('soLuong${sanPham.ISBN}').value+'&amp;ISBN=${sanPham.ISBN}'" href="#">Cập nhật</a>|
                                <a href="GioHang.htm?action=TraLai&ISBN=${sanPham.ISBN}">Trả lại</a></span>
                        </td></tr>
                    <tr><td colspan="2"></td></tr>
                </table>
            </c:forEach>

            <div style="width:auto;border-bottom:#d6d6d6 1px solid;" > &nbsp;</div>

            <table width="100%">
                <tr><td valign="top"><span style="font-size:medium; font-weight:bold; color:black">Tổng cộng:${TongTien} VNĐ</span></td><td align="right" valign="top">
                        <span class="linkitem"> (Tham khảo chi phí mua hàng <a href="help.htm"><b>click vào đây)</b></a></span></td></tr>
            </table>

            <div style="width:auto;border-bottom:#d6d6d6 1px solid;" > &nbsp;</div>
            <br/>
            <div style="padding-left:10px"><center><span class="linkitem" style="color:black"><a href="GioHang.htm?action=XoaTatCa" ><b>Trả lại toàn bộ</b></a> | <b><a href="TrangChu.htm">Tiếp tục mua hàng</a></b> | <b><a href="ThongTinKhachHang.htm">Thanh toán</a></b></span></center></div>
        </c:if>
        <c:if test="${empty(listSanPham)}">
            Giỏ hàng đang trống. <span class="linkitem"><a href="TrangChu.htm">Mời bạn chọn hàng.</a></span>

        </c:if>
    </div>
</div>